function y_landmark = f_unknown_landmark(x, landmark_idx_into_state)


l = landmark_idx_into_state;

landmark_ne_estimate = x(3 + (l-1)*2 + 1 : 3 + (l-1)*2 + 2);


% your code here

% y_landmark  = coordinates of the landmark in the robot's coordinate frame
%  Robot's coordinate frame: X axis pointing forward; Y axis pointing to
%  the right.

translated = [ landmark_ne_estimate(1) - x(1); 
               landmark_ne_estimate(2) - x(2)];   

rot = [cos(x(3))  sin(x(3)); 
       -sin(x(3))  cos(x(3))]; 
   
pt = rot * translated; 



y_landmark(1,1) = pt(1) ; % your code
y_landmark(2,1) = pt(2) ; % your code
